#include "widget.h"
#include "startwidget.h"
#include <QApplication>
#include <QResource>
#include <file.h>
#include <QStackedWidget>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QStackedWidget *stackedWidget = new QStackedWidget();
    startwidget *startWidget = new startwidget();
    Widget *gameWidget = new Widget();
    stackedWidget->addWidget(startWidget);
    stackedWidget->addWidget(gameWidget);
    QObject::connect(startWidget, &startwidget::startGame, [=]() {
        stackedWidget->setCurrentWidget(gameWidget);
        gameWidget->playgame();
    });
    stackedWidget->show();
     return a.exec();
}
